package com.android.jogomemoria;


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class Musica extends Activity implements Runnable{
	Bundle param;
	
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.musica);
		
		Button btnSim = (Button)findViewById(R.id.btnSim);
		Button btnNao = (Button)findViewById(R.id.btnNao);
		
		btnSim.setOnClickListener(new View.OnClickListener(){

			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent itPrincipal = new Intent(Musica.this, Principal.class);
				param = new Bundle();
				param.putBoolean("Toca", true);
				itPrincipal.putExtras(param);
				startActivity(itPrincipal);
				Musica.this.finish();
			}
			
		});
		
	
	btnNao.setOnClickListener(new View.OnClickListener(){

		public void onClick(View v) {
			// TODO Auto-generated method stub
			Intent itPrincipal = new Intent(Musica.this, Principal.class);
			param = new Bundle();
			param.putBoolean("Toca", false);
			itPrincipal.putExtras(param);
			startActivity(itPrincipal);
			Musica.this.finish();
		}
		
	});
	
}
	
	public void run() {
		// TODO Auto-generated method stub
		finish();
	}
	
	public void finish() {
		super.finish();
	}

}
